package com.zeta.edw.venus

import org.apache.spark.sql.{DataFrame, SaveMode}

class ExtractAll extends ExtractData {

  override def process(config: Config, df: DataFrame): Unit = {
    df.write.mode(SaveMode.Overwrite)
      .format("parquet")
      .option("compression", "snappy")
      .saveAsTable(s"${config.hiveDatabase}.${config.hiveTable}")
  }

  override def rangeStart(config: ExtractDataConfig): String = ???

  override def rangeEnd(config: ExtractDataConfig): String = ???
}

object ExtractAll extends ExtractAll {
  def main(args: Array[String]): Unit = {
    startApp(args, new Config())
  }
}
